<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- 遍历对象 -->
        <ul>
            <li v-for="item,index in persons">
                {{item}}=={{index}}
            </li>
        </ul>
        <!-- 遍历数字 数字是多少 代表遍历多少次
            eg：假设10  就是0-10 依次遍历
        -->
        <ul>
            <li v-for="(item,index) in num">
                {{item}}--{{index}}
            </li>
        </ul>
        <!-- 遍历字符串每一项 -->
        <ul>
            <li v-for="item,index in str">
                {{item}}--{{index}}
            </li>
        </ul>
    </div>
    <script>
        const vm =new Vue({
            el:"#app",
            data(){
                return {
                    persons: { id: "001", name: "laowang", age: 19 },
                    num:10,
                    str:'abc'
                }
            },

        })
    </script>
</body>
</html>